home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / qmsstins.arc / HOST.HST < prev    next >
Text File  |  1987-09-20  |  3KB  |  131 lines

  1. Clrscr                                    ; Clear the screen
  2.  
  3. ;
  4. ;     Uncomment out the followin lines if you want to switch
  5. ;     to a different Drive and/or Subdirectory for the HOST.
  6. ;
  7. ; Note Switching to HOST directory
  8. ; Chdir C:\QMODEM\HOST                    ; change to a subdirectory for
  9. ;                                         ; upload/download usage.
  10.  
  11.  
  12. IF '$0' = 'LOCAL' Get_Menu                ; if local, skip modem setup
  13.  
  14. Top:
  15.    Gosub Setup_Modem                      ; go set up the modem
  16.  
  17. Top2:
  18.    Timeout 32000 top2
  19.    Clrscr
  20.    Note Qmodem HOST 1.0        [ Waiting for Call ]
  21.    Note _______________________________________________________________
  22.  
  23.    Waitfor "RING"
  24.  
  25.    Gosub Answer_The_Call
  26.    Goto Top2
  27.  
  28. Connected:
  29.    When                       ; Clear pending WHENs
  30.    getx 0 " "                 ; Trap Baud in $0
  31.    SetComm  $0                ; Set COM port to match Modem
  32.    Beep 262
  33.    Beep 330
  34.    Beep 392
  35.    Beep 523
  36.    Beep 0
  37.    Beep 392
  38.    Beep 523
  39.    Turnon Online
  40.    Clrscr
  41.    Note Qmodem HOST 1.1             [ Connected! ]
  42.    Note ________________________________________________________________
  43.  
  44.    writeln " "
  45.    writeln " "
  46.    Writeln "This is Qmodem in Script HOST Mode."
  47.    Writeln "Please enter your First and Last name on the next line."
  48.    Writeln "[-----------------------------------]"
  49.    Write   " "
  50.    Getr 0 35
  51.    Writeln " "
  52.    Writeln "LOGing $0 into the Host..."
  53.    Stamp ********************************************
  54.    Stamp $0 logged onto the Host
  55.  
  56.  
  57. Get_Menu:
  58.    Writeln " "
  59.    Writeln "Main Menu :"
  60.    Writeln "   [C]hat with the HOST"
  61.    Writeln "   [L]ist Files to be Downloaded"
  62.    Writeln "   [U]pload a file to the HOST"
  63.    Writeln "   [D]ownload a File from the HOST"
  64.    Writeln "   [G]oodbye and Hangup"
  65.    Writeln " "
  66.    Write   "Menu: [C,L,U,D,G] ? "
  67.    Getr  8 1
  68.    if '$8' = 'C' Chat_
  69.    if '$8' = 'U' Upload_
  70.    if '$8' = 'D' Download_
  71.    if '$8' = 'L' List_
  72.    if '$8' = 'G' Quit_
  73.  
  74.    if '$8' = '_OFFLINE_' Quit_
  75.    goto Get_Menu
  76.  
  77.  
  78. Chat_:
  79.    Script Chat.Hst
  80.    Goto Get_Menu
  81.  
  82. Upload_:
  83.    Script u.hst
  84.    Goto Get_Menu
  85.  
  86. Download_:
  87.    Script D.HST
  88.    Goto Get_Menu
  89.  
  90. List_:
  91.    Script DIR.HST
  92.    Goto Get_Menu
  93.  
  94.  
  95. Quit_:
  96.    Writeln " "
  97.    Writeln "Thanks for calling!"
  98.    Gosub Cycle
  99.    Return
  100.  
  101.  
  102. Setup_Modem:
  103.    Clrscr
  104.    Note Qmodem HOST 1.1                 [ Modem Setup ]
  105.    Note ________________________________________________________________
  106.    Timeout 5 M1
  107.    M1:
  108.       Send    "ATE1Q0M1X1V1{"
  109.       Waitfor "OK"
  110.    Return
  111.  
  112. Any_Key:
  113.    Note
  114.    Write "Press ENTER to continue: "
  115.    Getr 9 0
  116.    Return
  117.  
  118. Answer_the_Call:
  119.    Send "ATA{"
  120.    When
  121.    When "Connect " Connected
  122.    Timeout 45 Error
  123.    Waitfor "No"
  124.    Gosub Cycle
  125.    Return
  126.  
  127. Cycle:
  128.    Hangup
  129.    Gosub Setup_Modem
  130.    Return
  131.